allowExtra

@NonNull
open fun allowExtra(@NonNull key: @NonNull String, @NonNull clazz: @NonNull Class<out Any>): @NonNull IntentSanitizer.Builder(source)

Allows an extra member whose key and type of value matches the given. This method can be called multiple times and the result is additive. They will not overwrite each other.

Return

this builder.

Parameters

key

the given extra key.

clazz

the given class of the extra value.


open fun <T> allowExtra(@NonNull key: @NonNull String, @NonNull clazz: @NonNull Class<T>, @NonNull valueFilter: @NonNull Predicate<T>): @NonNull IntentSanitizer.Builder(source)

Allows an extra member whose key matches the given key and whose value is of the type of the given clazz and passes the value filter. This method can be called multiple times and the result is additive. They will not overwrite each other.

Return

this builder.

Parameters

key

given extra key.

clazz

given type of the extra value.

valueFilter

the extra value filter.


@NonNull
open fun allowExtra(@NonNull key: @NonNull String, @NonNull filter: @NonNull Predicate<Any>): @NonNull IntentSanitizer.Builder(source)

Allows an extra member whose key matches the given key and whose value passes the filter test. This method can be called multiple times and the result is additive. They will not overwrite each other.

Return

this builder.

Parameters

key

the extra key.

filter

the filter for the extra value.